//package com.charley.icloud.service.impl;
//
//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
//import com.charley.icloud.entity.SysUser;
//import com.charley.icloud.mapper.SysUserMapper;
//import com.charley.icloud.service.ISysUserService;
//import org.springframework.security.core.userdetails.UserDetails;
//import org.springframework.security.core.userdetails.UserDetailsService;
//import org.springframework.security.core.userdetails.UsernameNotFoundException;
//import org.springframework.stereotype.Service;
//import org.springframework.util.ObjectUtils;
//
//
///**
// * 用户表 服务实现类
// */
//@Service
//public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService, UserDetailsService {
//
//    @Override
//    public UserDetails loadUserByUsername(String account) throws UsernameNotFoundException {
//        SysUser user = this.baseMapper.selectOne(Wrappers.<SysUser>lambdaQuery().eq(SysUser::getAccount, account));
//        if (ObjectUtils.isEmpty(user)){
//            throw new UsernameNotFoundException("找不到指定的用户信息!");
//        }
//        return user;
//    }
//}
